package com.thread.pool.application.scanner.policy;


import com.thread.pool.application.annotation.Actioner;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Ldanniel
 */
public class PolicyMethod {
    @Actioner(action = "MONDAY")
    public Map<String, Object> executePolicyOne(Map<String, Object> parameter) {
        Map<String, Object> dataMap = new HashMap<>();
        dataMap.put("ok", "等待时间为 100 毫秒 -> 执行完毕");
        dataMap.putAll(parameter);
        return dataMap;
    }

    @Actioner(action = "HELLO")
    public Map<String, Object> executeHello(Map<String, Object> parameter) {
        Map<String, Object> dataMap = new HashMap<>();
        dataMap.put("ok", "等待时间为 200 毫秒 -> 执行完毕");
        dataMap.putAll(parameter);
        return dataMap;
    }

    @Actioner(action = "TUESDAY")
    public Map<String, Object> executeTuesday(Map<String, Object> parameter) {
        Map<String, Object> dataMap = new HashMap<>();
        dataMap.put("ok", "等待时间为 300 毫秒 -> 执行完毕");
        dataMap.putAll(parameter);
        return dataMap;
    }
}
